package com.chujian.framework.core.tsdata;


import lombok.Getter;

/**
 * 返回结果消息状态码枚举
 */
@Getter
public enum ResultCode implements IResultCode {
    // 成功
    OK(0, "success"),
    // 缺省失败码
    ERR(-1, "failure"),

    AUTH(5, "授权异常"),
    PERMISSION(6, "访问无权限"),

    MSG(10, "消息异常"),
    BUSI(11, "业务异常"),

    BASE_VALID_PARAM(20, "参数校验失败"),

    // 占位
    PLACE_HOLDER(-2);

    private int code;
    private String msg;

    ResultCode(int code) {
        this.code = code;
    }

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
